import React, { Component } from 'react';
import store from './store'
export default class App extends Component {
  render() {
    return (
      <div>
        <button onClick = { () => {
          store.dispatch({
            type: 'REDUCE',
            payload: 5
          })
        }}>-</button>
        {/* <span>{ store.getState().count }</span> */}
        <span>{ store.getState().app.count }</span>
        <button onClick = { () => {
          store.dispatch({
            type: 'ADD',
            payload: 5
          })
        }}>+</button>
      </div>
    );
  }
}
